﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Moonwish.Silverlight.Controls">
<Style TargetType="local:ContentPlaceHolder">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ContentPlaceHolder">
                    <Grid x:Name="RootLayout" Margin="{TemplateBinding Margin}" Background="{TemplateBinding Background}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="28"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid x:Name="Header" Visibility="{TemplateBinding HeaderVisibility}">
                            <Border x:Name="Header_backgroud" BorderThickness="1" BorderBrush="#FFAFB9C5" Background="#FFF1F3F5" Margin="0" >
                            </Border>
                            <TextBlock x:Name="textBlock" Text="{TemplateBinding Header}" FontSize="{TemplateBinding FontSize}" 
                                       TextWrapping="Wrap" VerticalAlignment="Center" Margin="10,0,0,0"/>
                            <ContentPresenter x:Name="headerContent" Content="{TemplateBinding HeaderContent}"/>
                        </Grid>
                        <Grid Grid.Row="1">
                            <Border x:Name="Body" BorderThickness="1, 0, 1, 1" BorderBrush="#FFAFB9C5" />
                            <ContentPresenter />
                        </Grid>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
